<template>
	<view class="all">
		<!-- 内容 -->
		<view class="conent" v-for="(item,index) in arr" :key="index">
			<!-- 第一行 -->
			<view class=" title">
				<view class="title-left">
					<text>{{item.name}}</text>
					<text>{{item.serial}}</text>
				</view>
				<view class="title-right">
					<view class="medium">
						{{item.risk}}
					</view>
					<view class="blend">
						{{item.fundtype}}
					</view>
				</view>

			</view>
			<!-- 中间内容 -->
			<view class="middle">
				{{item.content}}
			</view>
			<!-- 发行时间 -->
			<view class="time">
				<text>发行时间</text>
				<text>{{item.fundtime}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		firstIssue
	} from "../../API/foodShop.js"
	export default {
		data() {
			return {
				arr: []
			}
		},
		methods: {
			fun() {
				firstIssue().then((res) => {
					console.log(res);
					this.arr = res.data.data
				}).catch((error) => {
					console.log(error);
				})
			},
			onShow() {
				this.fun()
			}
		}

	}
</script>

<style scoped>
	.all {
		background-color: #f7f7f1;
		height: 1625rpx;
	}

	.head {
		height: 80rpx;
		background-color: white;
		display: flex;
		align-items: center;
		padding: 0rpx 20rpx;
	}

	.head image {
		width: 50rpx;
		height: 50rpx;
	}

	.head-word {
		margin-left: 250rpx;
		font-size: 40rpx;
		font-weight: 600;
	}

	/* 内容 */
	.conent {
		height: 300rpx;
		background-color: white;
		width: 90%;
		margin: 20rpx auto;
		border-radius: 10rpx;
		position: relative;
	}

	.title {
		display: flex;
		justify-content: space-between;
		padding: 15rpx 20rpx;
		font-size: 36rpx;
	}

	.title-right {
		width: 50%;
		display: flex;
		justify-content: space-around;
		font-size: 24rpx;
		color: orange;
	}

	.medium,
	.blend {
		width: 140rpx;
		height: 40rpx;
		border: 1rpx solid orange;
		text-align: center;
		line-height: 40rpx;
	}

	.middle {
		height: 150rpx;
		padding: 10rpx 20rpx;
		/* 省略号 */
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	/* 发行时间 */
	.time {
		display: flex;
		justify-content: space-between;
		height: 60rpx;
		background-color: orange;
		position: absolute;
		bottom: 0;
		width: 100%;
		border-radius: 0rpx 0rpx 10rpx 10rpx;
		line-height: 60rpx;
		padding: 0rpx 20rpx;
		color: white;
		font-size: 34erpx;
	}
</style>